import request from '@/utils/request'

// 修改手机终端
export function updatePhone(data) {
    return request({
        url: '/combat/phone',
        method: 'put',
        data: data
    })
}
// 新增手机终端
export function addPhone(data) {
    return request({
        url: '/combat/phone',
        method: 'post',
        data: data
    })
}
//   根据终端id获取手机终端详细信息
export function detailPhone(phoneid) {
    return request({
        url: '/combat/phone/' + phoneid,
        method: 'get',
    })
}
//   删除手机终端
export function delPhone(phoneid) {
    return request({
        url: '/combat/phone/' + phoneid,
        method: 'delete'
    })
}
//   根据终端手机id获取全部apk列表
export function listApk(phoneid,data) {
    return request({
        url: '/combat/phone/applist/' + phoneid+'?pageNum='+data.pageNum+'&pageSize='+data.pageSize,
        method: 'get',
    })
}
//   导出手机终端列表
export function exportPhone(data) {
    return request({
        url: '/combat/phone/export',
        method: 'post',
        data: data
    })
}
//   获取全部手机终端列表
export function listPhone(query) {
    return request({
        url: '/combat/phone/list',
        method: 'get',
        params: query
    })
}

//获取终端管理的详情页信息
export function getDetailInfo(id){
    return request({
        url: '/combat/phone/getPhoneAppRiskInfo/'+id,
        method: 'get',
    })
}
// 下载apk
export function downloadApk(id) {
    return request({
        url: '/combat/application/download?appid='+id,
        method: 'get',
    })
}
